import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {MonitorComponent} from './monitor.component';
import {MainComponent} from './main/main.component';
import {NavigationComponent} from 'app/module/navigation/navigation.component';
import {TurbineDataListComponent} from './turbine-data-list/turbine-data-list.component';
import {TurbineListComponent} from './turbine-list/turbine-list.component';
import {TurbineMatrixComponent} from './turbine-matrix/turbine-matrix.component';
import {TurbineTrendComponent} from './turbine-trend/turbine-trend.component';
import {TurbineLoadComponent} from './turbine-load/turbine-load.component';
import {FarmLoadTrendComponent} from './farm-load-trend/farm-load-trend.component';
import {TurbineDetailComponent} from './turbine-detail/turbine-detail.component';
import {StationComponent} from './station/station.component';
import {ThreedComponent} from './threed/threed.component';
import {KeytargetComponent} from './keytarget/keytarget.component';
import {InverterListComponent} from './inverter-list/inverter-list.component';
import {ConvergenceboxListComponent} from './convergencebox-list/convergencebox-list.component';
import {InverterDetailComponent} from './inverter-detail/inverter-detail.component';
import {BoxSubStationComponent} from './boxsubstation/boxsubstation.component';
import {ApplicationService} from '../../service/application.service';
import {CapacityViewComponent} from './capacity-view/capacity-view.component';
import {NetworkComponent} from './network/network.component';
import {PhotovoltaicCurveComponent} from './photovoltaic-curve/photovoltaic-curve.component';

const routes: Routes =
  [{
    path: '', component: MonitorComponent, children: [
      {
        path: 'turblist/:farmId', component: TurbineListComponent, children: [{
          path: 'turbdetail', component: TurbineDetailComponent
        }]
      },
      {path: 'convergenceboxlist', component: ConvergenceboxListComponent},
      {
        path: 'inverterlist/:farmId', component: InverterListComponent, children: [{
          path: 'inverterdetail', component: InverterDetailComponent
        }]
      },
      {path: 'boxsubstation/:farmId', component: BoxSubStationComponent},

      {path: 'turbdatalist', component: TurbineDataListComponent},
      {
        path: 'turbmatrix', component: TurbineMatrixComponent, children: [{
          path: 'turbdetail', component: TurbineDetailComponent
        }]
      },
      {path: 'turbtrend', component: TurbineTrendComponent},
      {path: 'turbload', component: TurbineLoadComponent},
      {path: 'farmloadtrend', component: FarmLoadTrendComponent},
      {path: 'turbdetail/:farmId/:turbineId', component: TurbineDetailComponent},
      {path: 'station', component: StationComponent},
      {path: 'threed', component: ThreedComponent},
      {path: 'keytarget', component: KeytargetComponent},
      {path: 'inverterdetail/:farmId/:deviceId', component: InverterDetailComponent},
      {path: 'capacity', component: CapacityViewComponent},
      {path: 'network', component: NetworkComponent},
      {path: 'photovoltaicCurve', component: PhotovoltaicCurveComponent},
    ]
  },
  ];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class MonitorRoutingModule {
  constructor(
    private application: ApplicationService,
  ) {
  }
}


// WEBPACK FOOTER //
// ./src/app/module/monitor/monitor-routing.module.ts
